2020-2021 Sunseeker Telemetry and Lighting System
timer_a_ex6_upDownModeOperation.c File Reference
#include "driverlib.h"

Go to the source code of this file.

Macros

#define TIMER_A_PERIOD   250
 
#define DUTY_CYCLE   250
 

Functions

void main (void)
 

Macro Definition Documentation

◆ DUTY_CYCLE

#define DUTY_CYCLE   250

Definition at line 65 of file timer_a_ex6_upDownModeOperation.c.

◆ TIMER_A_PERIOD

#define TIMER_A_PERIOD   250

Toggle P2.4 using hardware TA1.0 output. Timer1_A is configured for up/down mode with CCR0 defining period, TA1.0 also output on P2.4. In this example, CCR0 is loaded with 250 and TA1.0 will toggle P2.4 at TACLK/2*250. Thus the output frequency on P2.4 will be the TACLK/1000. No CPU or software resources required. As coded with TACLK = SMCLK, P2.4 output frequency is ~1.045M/1000. SMCLK = MCLK = TACLK = default DCO ~1.045MHz

Tested On: MSP430FR5739

/ |
RST

| | | P2.4/TA1.0|--> SMCLK/1000

This example uses the following peripherals and I/O signals. You must review these and change as needed for your own board:

  • Timer peripheral
  • GPIO peripheral

This example uses the following interrupt handlers. To use this example in your own application you must add these interrupt handlers to your vector table.

  • NONE

Definition at line 64 of file timer_a_ex6_upDownModeOperation.c.

Function Documentation

◆ main()

void main ( void  )

Definition at line 67 of file timer_a_ex6_upDownModeOperation.c.

References __no_operation(), DUTY_CYCLE, and TIMER_A_PERIOD.